package demo;

public class Student {
    public String name ;
    public  int age ;
    public static String classroom ;

    static{
        classroom="9 calss";

    }

    public Student(){
        System.out.println("执行不带参数的构造方法");
    }

    {
        System.out.println("执行实例代码块");
        this.name = "zhangsan";
        this.age = 18;
    }


    //班级


    public void doClass1(){
        classroom ="9 class";
        doClass();
        System.out.println(this.name);
    }

    public static void doClass(){
        Student student = new Student();
        student. name ="zhangsan";
        student.age = 18;
    }

    public void doHomework(){
        System.out.println("做作业");
    }
}
